package com.hdax.dm.Controller;

import com.hdax.dm.dto.IndexNavDto;
import com.hdax.dm.dto.recommendDto;
import com.hdax.dm.service.recommendService;
import com.hdax.dm.utils.response.CommonResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/item")
public class recommendController {

    @Autowired
    private recommendService recommendService;

    /**
     * 今日推荐*
     */
    @PostMapping("index/recommend")
    public CommonResponse<List<recommendDto>> recommend(){
        return recommendService.recommend();
    }

    /**
     * 即将开售
     */
    @PostMapping("index/sell")
    public CommonResponse<List<recommendDto>> sell(){
        return recommendService.sell();
    }
}
